Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DMLQueryBuilder #233

Merged
merged 14 commits into from
Nov 1, 2023
Merged

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Aug 19, 2023

Related with yiisoft/db#746

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues

@what-the-diff
Copy link

what-the-diff bot commented Aug 19, 2023

PR Summary

  • Simplification and optimization in src/DMLQueryBuilder.php
    • There is a certain simplification and streamlining of code which translates to increased efficiency. Parts of the code (like the $mappedNames, $usingValues, etc.) have been removed and replaced with direct usage of others. Also, some variables were also rearranged for better readability and use.
  • Enhancements in tests/Provider/CommandProvider.php
    • The naming of certain test cases was improved (wrongBehavior was changed to table name with column name with brackets). This makes it easier to understand what the test cases are meant to check.
  • Additions to tests/Provider/QueryBuilderProvider.php
    • Two new test cases - column table names are not checked and regular values with unique at not the first position were introduced. These are useful to ensure our code works well even in scenarios that were not previously tested. The new tests will safeguard against potential bugs and ensure our software keeps working as expected.

@codecov
Copy link

codecov bot commented Aug 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (245d3ee) 98.30% compared to head (9fe6843) 98.44%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #233      +/-   ##
============================================
+ Coverage     98.30%   98.44%   +0.14%     
+ Complexity      189      184       -5     
============================================
  Files            16       16              
  Lines           589      580       -9     
============================================
- Hits            579      571       -8     
+ Misses           10        9       -1     
Files Coverage Δ
src/DMLQueryBuilder.php 100.00% <100.00%> (+0.92%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tigrov Tigrov marked this pull request as ready for review August 19, 2023 12:05
Tigrov added a commit to Tigrov/db-oracle that referenced this pull request Aug 20, 2023
@Tigrov Tigrov mentioned this pull request Aug 20, 2023
Tigrov added a commit that referenced this pull request Aug 20, 2023
Tigrov added a commit to Tigrov/db-oracle that referenced this pull request Aug 20, 2023
Tigrov added a commit that referenced this pull request Aug 20, 2023
Fix psalm issue (#233) better solution
src/DMLQueryBuilder.php Outdated Show resolved Hide resolved
src/DMLQueryBuilder.php Show resolved Hide resolved
@Tigrov Tigrov merged commit 5ecee24 into yiisoft:master Nov 1, 2023
16 of 17 checks passed
@Tigrov Tigrov deleted the refactor_dml_query_builder branch November 1, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants